<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Custom Cursor</title>
<style>
  input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
    caret-color: transparent; /* 隐藏原生光标 */
    position: relative;
  }
 
  input::after {
    content: '';
    position: absolute;
    left: 0; /* 光标初始位置 */
    top: 50%;
    width: 2px;
    height: 15px;
    background-color: black; /* 光标颜色 */
    transform: translateY(-50%);
    /* animation: blinkCursor 0.7s step-end infinite; */
  }
 
  @keyframes blinkCursor {
    to {
      left: 30%; /* 光标移动到末尾 */
    }
  }
</style>
</head>
<body>
  <input type="text" placeholder="请输入内容">
</body>
</html>